package org.applet.game.app.rpg.scene;

import java.awt.image.BufferedImage;
import java.io.File;

import org.applet.game.app.rpg.resource.BodyResource;
import org.applet.game.app.rpg.resource.ImageStore;
import org.applet.game.app.rpg.resource.MultiImageStore;
import org.applet.game.framework.util.ImageLoader;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		ImageStore is = new MultiImageStore("0", 22);
//		is.load();
//		is.saveTo(new File("down.png"));
		//BodyResource br = new BodyResource("3");
		//br.load();
		doit(16, 24, "attackFrames.png");
	}

	static void doit(int from, int to, String file)
	{
		BufferedImage image = ImageLoader.loadImage("101.gif");
		BufferedImage newi = new BufferedImage(200*(to-from+1), 1600, BufferedImage.TYPE_4BYTE_ABGR);
		newi.getGraphics().drawImage(image, 0, 0, 200*(to-from+1), 1600, 200*from, 0, 200*(to+1), 1600, null);
		ImageLoader.saveImageTo(newi, file, "png");
	}
}
